<template>
  <el-container>
    <el-header>
      <!-- 头1 -->
      <el-row class="title">
        <el-col :span="15">
          <div class="title-left">
            <<router-link to="welcome"><span>政府投资项目审计监督平台 </span></router-link>
          </div>
        </el-col>

        <el-col :span="2">
          <a href="/map" target="_blank">
            <div class="title-right" @mouseover="mouseOver" @mouseleave="mouseLeave" :style="active">
              <i class="el-icon-location-outline"></i>
              <span>地图</span>
            </div>
          </a>
        </el-col>
        <el-col :span="2">
          <a href="/gismap" target="_blank">
            <div class="title-right">
              <i class="el-icon-location-outline"></i>
              <span>GIS地图</span>
            </div>
          </a>
        </el-col>

        <el-col :span="2">
          <div class="title-right">
            <i class="el-icon-s-custom"></i>
            <span>市审计局</span>
          </div>
        </el-col>
        <el-col :span="2">
          <div class="title-right" @click="">登出</div>
        </el-col>
      </el-row>
      <!-- 头1 -->
      <!-- 头2 -->
      <el-row>
        <el-col :span="24">
          <el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect" router>
            <div style="display: flex; justify-content: space-around; padding: 20px;">
              <div>
                <el-input v-model="search" size="max" placeholder="输入关键字搜索" maxlength=50>
                  <template slot="append">搜索项目</template>
                </el-input>
              </div>

            </div>
            </el-menu-item>
          </el-menu>
        </el-col>
      </el-row>
      <!-- 头2 -->
    </el-header>
    <el-header>

    </el-header>
    <el-main>
      <router-view></router-view>
    </el-main>
    <!-- 底部 -->
    <el-footer>
      <span>版权所有</span>
    </el-footer>
  </el-container>
</template>


<script>
  export default {
    name: "HomeBack",
    data() {
      return {
        activeIndex: "1",
        activeIndex2: "1",
        input2: "",
        search: ""
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      },

      async logout() {
        this.$store.dispatch('LogOut').then(() => {
          this.$router.push('/login')

        })
      }
    },
  };

</script>

<style lang="less" scoped>
  .el-container {
    height: 100vh;
  }

  .title {
    padding: 20px;
  }

  .title-left {
    font-size: 30px;
    color: #1cb0f2;
  }

  .title-right {
    text-align: right;
  }


  .submenu_title {
    font-size: 20px;
  }

  .el-menu-item {
    font-size: 20px;
  }

  .el-menu-item-last {
    float: right;
  }

  .el-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
</style>
